import { XSSFilter, defaultXssOptions } from './xss'

export * from './default'
export { parseTag, parseAttr } from './parser'

/**
 * filter xss function
 *
 * @param {String} html
 * @param {Object} options { whiteList, onTag, onTagAttr, onIgnoreTag, onIgnoreTagAttr, safeAttrValue, escapeHtml }
 * @return {String}
 */
export function filterXSS(html, options) {
  const xss = new XSSFilter(options)
  return xss.process(html)
}

export { XSSFilter, defaultXssOptions } from './xss'
